package com.smart.common.config.datasource;

import cn.hutool.core.util.IdUtil;
import io.ebean.config.IdGenerator;

/**
 * 雪花算法组件生成策略
 *
 * @author Administrator
 * @date 2022-08-15
 */
public class EbeanIdGenerator implements IdGenerator {

    @Override
    public Object nextValue() {
        return IdUtil.getSnowflakeNextId();


    }

    @Override
    public String getName() {
        return "snowflake";
    }
}